package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 管理员信息表
 */

/**
 * Admin generated by hbm2java
 */
@Entity
@Table(name = "admin", catalog = "good_fresh")
public class Admin implements java.io.Serializable {

	/**
	 * 管理员ID
	 */
	private Integer adminId;  
	private String adminAccount;  
	private String adminName;
	private String adminPassword;
	private Integer adminSex;
	private String adminMobile;
	private Integer adminPost;
	private String adminSite;
	private Date createTime;
	private Date updateTime;
	private String adminHoldOne;
	private String adminHoldTwo;
	private Set<GoodsInfo> goodsInfos = new HashSet<GoodsInfo>(0);
	private Set<GoodsExplain> goodsExplains = new HashSet<GoodsExplain>(0);

	public Admin() {
	}

	public Admin(String adminAccount, String adminName, String adminPassword, Integer adminSex, String adminMobile,
			Integer adminPost, String adminSite, Date createTime, Date updateTime, String adminHoldOne,
			String adminHoldTwo, Set<GoodsInfo> goodsInfos, Set<GoodsExplain> goodsExplains) {
		this.adminAccount = adminAccount;
		this.adminName = adminName;
		this.adminPassword = adminPassword;
		this.adminSex = adminSex;
		this.adminMobile = adminMobile;
		this.adminPost = adminPost;
		this.adminSite = adminSite;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.adminHoldOne = adminHoldOne;
		this.adminHoldTwo = adminHoldTwo;
		this.goodsInfos = goodsInfos;
		this.goodsExplains = goodsExplains;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "ADMIN_ID", unique = true, nullable = false)
	public Integer getAdminId() {
		return this.adminId;
	}

	public void setAdminId(Integer adminId) {
		this.adminId = adminId;
	}

	@Column(name = "ADMIN_ACCOUNT")
	public String getAdminAccount() {
		return this.adminAccount;
	}

	public void setAdminAccount(String adminAccount) {
		this.adminAccount = adminAccount;
	}

	@Column(name = "ADMIN_NAME")
	public String getAdminName() {
		return this.adminName;
	}

	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}

	@Column(name = "ADMIN_PASSWORD")
	public String getAdminPassword() {
		return this.adminPassword;
	}

	public void setAdminPassword(String adminPassword) {
		this.adminPassword = adminPassword;
	}

	@Column(name = "ADMIN_SEX")
	public Integer getAdminSex() {
		return this.adminSex;
	}

	public void setAdminSex(Integer adminSex) {
		this.adminSex = adminSex;
	}

	@Column(name = "ADMIN_MOBILE")
	public String getAdminMobile() {
		return this.adminMobile;
	}

	public void setAdminMobile(String adminMobile) {
		this.adminMobile = adminMobile;
	}

	@Column(name = "ADMIN_POST")
	public Integer getAdminPost() {
		return this.adminPost;
	}

	public void setAdminPost(Integer adminPost) {
		this.adminPost = adminPost;
	}

	@Column(name = "ADMIN_SITE")
	public String getAdminSite() {
		return this.adminSite;
	}

	public void setAdminSite(String adminSite) {
		this.adminSite = adminSite;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "ADMIN_HOLD_ONE")
	public String getAdminHoldOne() {
		return this.adminHoldOne;
	}

	public void setAdminHoldOne(String adminHoldOne) {
		this.adminHoldOne = adminHoldOne;
	}

	@Column(name = "ADMIN_HOLD_TWO")
	public String getAdminHoldTwo() {
		return this.adminHoldTwo;
	}

	public void setAdminHoldTwo(String adminHoldTwo) {
		this.adminHoldTwo = adminHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "admin")
	public Set<GoodsInfo> getGoodsInfos() {
		return this.goodsInfos;
	}

	public void setGoodsInfos(Set<GoodsInfo> goodsInfos) {
		this.goodsInfos = goodsInfos;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "admin")
	public Set<GoodsExplain> getGoodsExplains() {
		return this.goodsExplains;
	}

	public void setGoodsExplains(Set<GoodsExplain> goodsExplains) {
		this.goodsExplains = goodsExplains;
	}

}
